home *** CD-ROM | disk | FTP | other *** search
- PROCEDURE Coward;
-
- {
- Author: David Malmberg
-
- Strategy: Raise shield. Go to a top left corner and wait. Never fire.
- Conserve fuel and try to out last opponents and win by default.
-
- When using fuel, this robot can be suprisingly effective.
- If not using fuel, its "sitting-duck" strategy makes it easy
- prey.
- }
-
-
- PROCEDURE GOTO(x, y : Integer);
- { Go to location X,Y on playing field. }
- VAR Heading : Integer;
- BEGIN
- { Find the heading we need to get to the desired spot. }
- Heading := Angle_To(x, y);
-
- { Keep traveling at top speed until we are within 150 meters }
- WHILE (distance(loc_x, loc_y, x, y) > 150) DO Drive(Heading, 100);
-
- { Cut speed, and creep the rest of the way. }
- WHILE (distance(loc_x, loc_y, x, y) > 20) DO Drive(Heading, 20);
-
- { Stop driving, should coast to a stop. }
- Drive(Heading, 0); {I.E., Stop}
- END; {GoTo(X,Y)}
-
-
- BEGIN {Coward Main}
- RaiseShield;
- GoTo(0,999); {Top left corner}
- REPEAT
- {emtpy -- do nothing}
- UNTIL Winner OR Dead;
- END; {Coward Main}
-